<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<link rel="stylesheet" type="text/css" href="${initParam.root }css/button.css">
<link rel="stylesheet" type="text/css" href="${initParam.root }css/table.css">
<link rel="stylesheet" type="text/css" href="${initParam.root }css/index.css">
<style type="text/css">
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	font: small/1.5 "Tahoma", "Bitstream Vera Sans", Verdana, Helvetica, sans-serif;
}

#logo_loginView:hover{
	cursor:pointer;
}

input {
  border: 1px solid silver;
  border-radius: 5px;
  -webkit-appearance: none;
  height: 50px;
  width: 350px;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  font-size: 12pt;
  padding-left: 10px;
  font-family: small/1.5 "Tahoma", "Bitstream Vera Sans", Verdana, Helvetica, sans-serif;
}
</style>
<script type="text/javascript">
	$(document).ready(function(){
		$("#loginBtn").click(function(){
			$("#loginForm_view").submit();
		});
		$("#loginForm_view").submit(function(){
			if($("#id").val()==""){
				alert("아이디를 입력해주세요.");
				$("#id").focus();
				return false;
			}else if($("#password").val()==""){
				alert("비밀번호를 입력해주세요.");
				$("#password").focus();
				return false;
			}
		}); // click
		
		$(":input[name=id], :input[name=password]").keypress(function(event){
			if(event.keyCode == 13){
				$("#loginForm_view").submit();
				return false;
			}
		});
		
		$("#logoutBtn").click(function(){
			if(confirm("로그아웃하시겠습니까?")){
				location.href="${initParam.root}logout.do";
			} // if
		});//logout
		$("#messagePopup").click(function(){
		    window.open("${initParam.root}messenger/auth_messengerPopup.do?tab=0", "popup", "width=750, height=500, location=no, toolbar=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no" );
		});
		$("#logo_loginView").click(function(){
			location.href="${initParam.root}";
		});
	}); // ready
</script>
</head>
<body>
<br><br><br><br>
<div id="loginView">
	<img src="${initParam.root }img/logo_loginView.png" id="logo_loginView">
	<form id="loginForm_view" method="post" action="${initParam.root }login.do">
		<table align="center">
			<tr>
				<td align="left" colspan="2" style="font-size: 10pt;">Id<br>
				<input type="text" placeholder="아이디" name="id" id="id" size="15">
			</tr>
			<tr>
				<td align="left" colspan="2" style="font-size: 10pt;">
					Password<br>
				<input type="password" placeholder="비밀번호" name="password"
					id="password" size="15">
				</td>
			</tr>
			<tr>
				<td align="left" valign="bottom" colspan="2"><img
					src="${initParam.root}img/loginBtn_loginView.png" width="350px" id="loginBtn"
					class="img_button">
				</td>
			</tr>
			<tr>
			</tr>
		</table>
		<br>
		<hr width="350px" size="1" color="silver">
		<br>
		<span style="font-size: 12px">
		<a href="${initParam.root}register.do">회원가입</a>&nbsp;&nbsp; | &nbsp;
		<a href="${initParam.root}findId.do">아이디 찾기</a>&nbsp;&nbsp; | &nbsp;
		<a href="${initParam.root}findPassword.do">비밀번호 찾기</a>
		</span>
	</form>
</div>
</body>
</html>